home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / polyed.lha / PolyEd / doc / arexx.doc < prev    next >
Encoding:
Text File  |  1994-09-29  |  16.0 KB  |  542 lines

  1.  
  2.                        PolyEd's ARexx commands
  3.  
  4.                     Copyright © 1994 Avalon UnLtd.
  5.                       Written by Robert Brandner
  6.                          All Rights Reserved
  7.  
  8.  
  9. Like every good program, PolyEd provides an ARexx Port. This document
  10. describes all ARexx commands, PolyEd supports. For details about
  11. results, naming of ports etc. see the main guide (it's name depends
  12. on your preferred language).
  13.  
  14. Sorry, this document is - at the moment - only available in english.
  15.  
  16.  
  17. --------------------------------------------------------------------------
  18.  
  19. ACTIVATEWINDOW
  20.    ,
  21.  
  22. ACTIVATEWINDOW activates the first window of the project.
  23.  
  24. --------------------------------------------------------------------------
  25.  
  26. BACKSPACE
  27.    ,
  28.  
  29. BACKSPACE deletes the character left to the cursor. At the beginning
  30. of a line, the EOL character of the previous line is deleted, and so
  31. the previous and the current line are joined.
  32.  
  33. --------------------------------------------------------------------------
  34.  
  35. BLOCK
  36.    START/S,FORGET/S
  37.  
  38. BLOCK starts or forgets block selection.
  39.  
  40.  · START starts block selection. Following cursor movements will
  41.    select the block. Then you may CUT, COPY or ERASE the block.
  42.  · FORGET forgets selection.
  43.  
  44. Inserting or deleting text, or any mouse actions by the user,
  45. have the same effect as BLOCK FORGET, So you should "LOCKGUI", to
  46. avoid unwanted actions by the user.
  47.  
  48. --------------------------------------------------------------------------
  49.  
  50. CHANGEWINDOW
  51.    LEFTEDGE/N,TOPEDGE/N,WIDTH/N,HEIGHT/N
  52.  
  53. CHANGEWINDOW changes the position and size of the first window of
  54. the project.
  55.  
  56. --------------------------------------------------------------------------
  57.  
  58. CLOSE
  59.    FORCE/S
  60.  
  61. CLOSE closes the project and its window(s). If the project has been
  62. modified, the modified project requester comes up, asking the user if
  63. he wants to save the project first.
  64.  
  65.  · FORCE suppresses the modified project requester.
  66.  
  67. --------------------------------------------------------------------------
  68.  
  69. COLUMN
  70.    DELTA/N/A
  71.  
  72. COLUMN accepts positive and negative values, to move the cursor left or 
  73. right relative to its current position.
  74.  
  75. --------------------------------------------------------------------------
  76.  
  77. COPY 
  78.    ,
  79.  
  80. COPY places a duplicate of the currently selected block into the 
  81. clipboard.
  82.  
  83. --------------------------------------------------------------------------
  84.  
  85. CURSOR
  86.    UP/S,DOWN/S,LEFT/S,RIGHT/S
  87.  
  88. CURSOR moves the cursor up, down, left or right a single line or
  89. column position.
  90.  
  91. --------------------------------------------------------------------------
  92.  
  93. CUT
  94.    LINE/S,EOL/S
  95.  
  96. CUT removes the currently selected block from the project, and places
  97. it in the clipboard.
  98.  
  99.  · LINE cuts the current line (incl. EOL)
  100.  · EOL cuts from current cursor position to end of line (excl. EOL)
  101.  
  102. --------------------------------------------------------------------------
  103.  
  104. DELETE
  105.    ,
  106.  
  107. DELETE removes the character right to the cursor.
  108.  
  109. --------------------------------------------------------------------------
  110.  
  111. ERASE
  112.    ,
  113.  
  114. ERASE removes the selected block from the project.
  115.  
  116. --------------------------------------------------------------------------
  117.  
  118. FIND
  119.    PROMPT/S,NEXT/S,PREVIOUS/S,TEXT/F
  120.  
  121. FIND searches for text that matches the specified text.
  122.  
  123.  · PROMPT opens the Find requester, but does not search.
  124.  · NEXT searches for the next occurence of findstring.
  125.  · PREVIOUS searches for the previous occurence of findstring.
  126.  · TEXT sets findstring to specified text.
  127.  
  128. 'FIND NEXT' finds the next occurence of whatever findstring is.
  129. 'FIND foobar' sets findstring to 'foobar' but does not search.
  130. 'FIND NEXT foobar' sets findstring to 'foobar' and searches.
  131. 'FIND PROMPT' opens the Find requester.
  132.  
  133. --------------------------------------------------------------------------
  134.  
  135. FINDCHANGE
  136.    FINDCHANGE PROMPT/S,FIND/K,CHANGE/K,ALL/S
  137.  
  138. Searches for text and replaces it by another text. This is done  like 
  139. replace from the menu, i. e. if the selected block matches findstring 
  140. it is replaced by changestring, else nothing is done. Then the next 
  141. occurence of findstring is selected. 
  142.  
  143.  · PROMPT opens the Find & Change requester, but does not search.
  144.  · FIND sets findstring to specified text.
  145.  · CHANGE sets changestring to specified text.
  146.  · ALL searches and changes from current cursor position to end
  147.    of text.
  148.  
  149. 'FINDCHANGE FIND foobar CHANGE hello' sets findstring to 'foobar',
  150. changestring to 'hello' and does a find & replace.
  151. 'FINDCHANGE' does a find & replace with current findstring
  152. and changestring.
  153.  
  154. --------------------------------------------------------------------------
  155.  
  156. FINDNEXT
  157.    ,
  158.  
  159. FINDNEXT finds the next occurence of findstring.
  160.  
  161. --------------------------------------------------------------------------
  162.  
  163. FINDPREVIOUS
  164.    ,
  165.  
  166. FINDPREVIOUS finds the previous occurence of findstring.    
  167.  
  168. --------------------------------------------------------------------------
  169.  
  170. GETATTR
  171.    OBJECT/A,NAME,FIELD
  172.  
  173. GETATTR obtains information about the attributes of an object.
  174.  
  175.  · OBJECT specifies the object type to obtain information on.
  176.  · NAME specifies the name of the object.
  177.  · FIELD spceifies which field should be checked for information.
  178.  
  179. In the above OBJECT you may seek information an the attributes of 
  180. any of the following items:
  181.  
  182.  · APPLICATION
  183.  · PROJECTS
  184.  · PROJECT <name>
  185.  · MACROS
  186.  · MACRO <name>
  187.  
  188. If the destination variable is a stem variable, the following fields 
  189. are available:
  190.  
  191. APPLICATION consists of the following nodes (an aspect of APPLICATION
  192. you can seek sub-information about):
  193.  
  194.  · VERSION         Contains the current version information.
  195.  · SCREEN        Contains the name of the public screen, 
  196.             PolyEd resides in.
  197.  · CURRENT        Contains the name of current project's
  198.             arexx port.
  199.  · AREXX        Contains the name of PolyEd's global port.
  200.  · VAR_BLOCKSTARTLINE      These four nodes ...
  201.  · VAR_BLOCKSTARTCOL    ... contain the beginning ...
  202.  · VAR_BLOCKENDLINE    ... and end of ...
  203.  · VAR_BLOCKENDCOL    ... the selected block.
  204.  · VAR_FINDSTRING    Contains the findstring FIND, FINDCHANGE,
  205.             FINDNEXT and FINDPREVIOUS look for.
  206.  · VAR_CHANGESTRING    Contains the changestring, FINDCHANGE uses.
  207.  · FLAG_IGNORECASE    Contains the status of 'Ignore Case?'.
  208.  · FLAG_WHOLEWORDS    Contains the status of 'Whole Words?'.
  209.  · VAR_ARRANGEMODE    Contains the status of window arrange style
  210.             ( 0=stacked, 1=vertical, 2=horizontal, 3=full size )
  211.  · FLAG_LEARNING    Contains the status of 'Learn macro'.
  212.  · VAR_RIGHTBORDER    Contains right border value (from settings).
  213.  · VAR_TABWIDTH        Contains Tab width value (from settings).
  214.  · FLAG_OVERWRITE    Contains the status of 'Overwrite?'.
  215.  · FLAG_AUTOINDENT    Contains the status of 'Auto indent?'.
  216.  · FLAG_TABISSPACES    Contains the status of 'TAB is spaces?'.
  217.  · FLAG_CREATEICONS    Contains the status of 'Create icons?'.
  218.  · VAR_FULLINES        Contains the status of 'Full Lines'
  219.             ( 0=ignore, 1=word wrap ).
  220.  · VAR_AUTOSAVE      Contains the status of 'Auto Save'
  221.             ( 0=never, 1=every 5 min, 2=every 10 min, 
  222.             3=every 15 min, 4=every 30 min, 5=every hour ).
  223.  · VAR_BACKUPS        Contains the status of 'Backups'
  224.             ( 0=none, 1=last version, 2=infinite ).
  225.  · VAR_SAVEAS        Contains the status of 'Save as'
  226.             ( 0=ASCII, 1=IFF FTXT ).
  227.  
  228. PROJECTS.COUNT contains the number of projects; PROJECTS.0 through 
  229. PROJECTS.n contain the name of the project.
  230.  
  231. PROJECT consists of the following nodes:
  232.  
  233.  · AREXX        Contains the ARexx port of the project.
  234.  · FILENAME        Contains the complete filename of the project.
  235.  · PATH            Contains the path portion of the filename.
  236.  · FILE            Contains the file portion of the filename.
  237.  · LINES        Contains the number of lines of the project.
  238.  · CHANGES        Contains the number of cchanges mode to the 
  239.             project (since last save).
  240.  
  241. MACROS.COUNT contains the number of macros; MACROS.0 through 
  242. MACROS.n contain the name of the macro.
  243.  
  244. MACRO consists of the following nodes:
  245.  
  246.  · FILENAME        Contains the filename of the macro.
  247.  · HOTKEY        Contains the macros hotkey.
  248.  
  249. See the demo program 'getattr.ped' for how to use this complex command.
  250.  
  251. --------------------------------------------------------------------------
  252.  
  253. GETCHAR 
  254.    ,
  255.  
  256. GETCHAR returns the character right to (or under) the cursor.
  257.  
  258. --------------------------------------------------------------------------
  259.  
  260. GETCURSORPOS 
  261.    ,
  262.  
  263. GETCURSORPOS returns the position of the cursor. The following nodes 
  264. are returned when using a stem variable:
  265.  
  266.  · LINE        Contains the line, the cursor is in.
  267.  · COLUMN    Contains the column the cursor is in.
  268.  
  269. --------------------------------------------------------------------------
  270.  
  271. GETLINE 
  272.    ,
  273.  
  274. GETLINE returns the contents of the line, under the cursor.
  275.  
  276. --------------------------------------------------------------------------
  277.  
  278. GETWORD 
  279.    ,
  280.  
  281. GETWORD returns the word under the cursor.
  282.  
  283. --------------------------------------------------------------------------
  284.  
  285. GOTOAUTOMARK 
  286.    ,
  287.  
  288. GOTOAUTOMARK moves to the cursor to the position where the last 
  289. change was made to the project.
  290.  
  291. --------------------------------------------------------------------------
  292.  
  293. GOTOCOLUMN
  294.    COLUMN/N/A
  295.  
  296. GOTOCOLUMN moves the cursor to the specified position.
  297.  
  298. --------------------------------------------------------------------------
  299.  
  300. GOTOLINE
  301.    LINE/N/A
  302.  
  303. GOTOLINE moves the cursor to the specified line.
  304.  
  305. --------------------------------------------------------------------------
  306.  
  307. LEARN
  308.    FILE/K,STOP/S
  309.  
  310. LEARN allows PolyEd to build an ARexx macro consisting of the 
  311. actions the user performs.
  312.  
  313.  · FILE specifies where the macro is to be saved.
  314.  · STOP tells PolyEd to stop learning.
  315.  
  316. --------------------------------------------------------------------------
  317.  
  318. LINE
  319.    DELTA/N/K
  320.  
  321. LINE accepts positive or negative arguemtns to move the cursor up or 
  322. down relative to its current position.
  323.  
  324. --------------------------------------------------------------------------
  325.  
  326. LOCKGUI 
  327.    ,
  328.  
  329. LOCKGUI inhibits the graphical user interface of PolyEd.
  330.  
  331. --------------------------------------------------------------------------
  332.  
  333. MOVEWINDOW
  334.    LEFTEDGE/N,TOPEDGE/N
  335.  
  336. MOVEWINDOW is used to change the position of the first window of the 
  337. project. A value of -1 means no change or don't care.    
  338.  
  339. --------------------------------------------------------------------------
  340.  
  341. NEW
  342.    PORTNAME/K
  343.  
  344. NEW creates a new project. It returns the ARexx port name assigned 
  345. to the project.
  346.  
  347.  · PORTNAME is used to assign a specific port name.
  348.  
  349. --------------------------------------------------------------------------
  350.  
  351. OPEN
  352.    FILENAME/K,PORTNAME/K
  353.  
  354. OPEN opens the specified text into a new project (if there is an
  355. unmodified new project around it will be opened into that).
  356. The ARexx port assigned to the project is returned.
  357.  
  358.  · FILENAME specifies the file to be opened.
  359.  · PORTNAME is used to assign a specific port name.
  360.  
  361. --------------------------------------------------------------------------
  362.  
  363. PASTE 
  364.    ,
  365.  
  366. PASTE puts the contents of the clipboard into the project - at the 
  367. cursor position.    
  368.  
  369. --------------------------------------------------------------------------
  370.  
  371. POSITION
  372.    SOF/S,EOF/S,SOL/S,EOL/S,SOW/S,EOW/S,SOV/S,EOV/S
  373.  
  374. POSITION moves the cursor to the position specified by the argument:
  375.  · SOF moves it to the beginning of the file.
  376.  · EOF moves it to the end of the file.
  377.  · SOL moves it to the beginning of the current line.
  378.  · EOL moves it to the end of the current line.
  379.  · SOW moves it to the start of the current word.
  380.  · EOW moves it to the end of the current word.
  381.  · SOV moves it to the top of the current view.
  382.  · EOV moves it to the end of the current view.
  383.  
  384. --------------------------------------------------------------------------
  385.  
  386. PRINT
  387.    FILENAME/K
  388.  
  389. PRINT prints the contents of the current project. If FILENAME is 
  390. set, the text is print to the specified file instead of the printer.
  391.  
  392.  · FILENAME specifies a file where the text shall be printed to.
  393.  
  394. --------------------------------------------------------------------------
  395.  
  396. QUIT
  397.    FORCE/S
  398.  
  399. QUIT ends PolyEd. For every modified project a modified project 
  400. requester comes up.
  401.  
  402.  · FORCE suppresses the modified project requesters.
  403.  
  404. --------------------------------------------------------------------------
  405.  
  406. REDO 
  407.    ,
  408.  
  409. REDO allows you to undo the "UNDO" command.    
  410.  
  411. --------------------------------------------------------------------------
  412.  
  413. SAVE 
  414.    ,
  415.  
  416. SAVE saves the current project to its current filename. If the 
  417. project is unnamed, a file requester comes up, asking the user for a 
  418. name for the project.    
  419.  
  420. --------------------------------------------------------------------------
  421.  
  422. SAVEAS
  423.    NAME/K 
  424.  
  425. This command saves the current project to the specified filename. If 
  426. no name is specified, a file requester comes up, asking the user for 
  427. a filename for the project.
  428.  
  429.  · NAME specifies the name to that the project should be saved. The 
  430.    name should be placed in quotes.
  431.  
  432. --------------------------------------------------------------------------
  433.  
  434. SETATTR
  435.    OBJECT/A,FIELD,NEWVALUE
  436.  
  437. SETATTR manipulates the aspects of an object.
  438.  
  439.  · OBJECT specifies the object type to manipulate.
  440.  · FIELD specifies which field should be modified.
  441.  · NEWVALUE specifies the new value for that field. Watch out; some
  442.    fields require numeric values, some require strings.
  443.  
  444. Currently only APPLICATION is allowed as OBJECT type.
  445. Valid values for FLAG_xxx fields are 0 and 1, where
  446. 0 means no/off/false and 1 means yes/on/true.
  447.                    
  448. The following fields may be manipulated:
  449.  
  450.  · VAR_FINDSTRING    Contains the findstring FIND, FINDCHANGE,
  451.             FINDNEXT and FINDPREVIOUS look for.
  452.  · VAR_CHANGESTRING    Contains the changestring, FINDCHANGE uses.
  453.  · FLAG_IGNORECASE    Contains the status of 'Ignore Case?'.
  454.  · FLAG_WHOLEWORDS    Contains the status of 'Whole Words?'.
  455.  · VAR_ARRANGEMODE    Contains the status of window arrange style
  456.             ( 0=stacked, 1=vertical, 2=horizontal, 3=full size )
  457.  · VAR_RIGHTBORDER    Contains right border value (from settings).
  458.  · VAR_TABWIDTH        Contains Tab width value (from settings).
  459.  · FLAG_OVERWRITE    Contains the status of 'Overwrite?'.
  460.  · FLAG_AUTOINDENT    Contains the status of 'Auto indent?'.
  461.  · FLAG_TABISSPACES    Contains the status of 'TAB is spaces?'.
  462.  · FLAG_CREATEICONS    Contains the status of 'Create icons?'.
  463.  · VAR_FULLINES        Contains the status of 'Full Lines'
  464.             ( 0=ignore, 1=word wrap ).
  465.  · VAR_AUTOSAVE      Contains the status of 'Auto Save'
  466.             ( 0=never, 1=every 5 min, 2=every 10 min,
  467.             3=every 15 min, 4=every 30 min, 5=every hour ).
  468.  · VAR_BACKUPS        Contains the status of 'Backups'
  469.             ( 0=none, 1=last version, 2=infinite ).
  470.  · VAR_SAVEAS        Contains the status of 'Save as'
  471.             ( 0=ASCII, 1=IFF FTXT ).
  472.  
  473. For example 'SETATTR APPLICATION VAR_TABWIDTH 6' sets the Tab Width
  474. to 6. All modifications are immediately made visible to the user.
  475.  
  476. --------------------------------------------------------------------------
  477.  
  478. SIZEWINDOW
  479.    WIDTH/N,HEIGHT/N
  480.  
  481. SIZEWINDOW allows to change the size of the project's first window.
  482.  
  483. --------------------------------------------------------------------------
  484.  
  485. TEXT
  486.    NEWLINE/S,TEXT/F
  487.  
  488. TEXT inserts the specified text at the current cursor position of
  489. the project.
  490.  
  491.  · NEWLINE begins a new line _before_ the text is inserted.
  492.  · TEXT specifies the text to be inserted. If the text contains
  493.    spaces, or if there are spaces at the beginning or end of the
  494.    text, you should explicitly use the keyword, because otherwise
  495.    leading and trailing spaces are stripped off by the arugment
  496.    parser.
  497.  
  498. --------------------------------------------------------------------------
  499.  
  500. UNDO
  501.    ,
  502.  
  503. UNDO undoes actions of the user. UNDO can be undone by "REDO".
  504. See also menu item  'Edit/Undo'.
  505.  
  506. --------------------------------------------------------------------------
  507.  
  508. UNLOCKGUI
  509.    ,
  510.  
  511. UNLOCKGUI undoes "LOCKGUI" allowing GUI events to resume.
  512.  
  513. --------------------------------------------------------------------------
  514.  
  515. UNZOOMWINDOW
  516.    ,
  517.  
  518. UNZOOMWINDOW unshrinks the project's first window (see "ZOOMWINDOW").
  519.  
  520. --------------------------------------------------------------------------
  521.  
  522. WINDOWTOBACK
  523.    ,
  524.  
  525. WINDOWTOBACK moves the project's first window behind all other windows.
  526.  
  527. --------------------------------------------------------------------------
  528.  
  529. WINDOWTOFRONT
  530.    ,
  531.  
  532. WINDOWTOFRONT moves the project's first window in front of all other
  533. windows.
  534.  
  535. --------------------------------------------------------------------------
  536.  
  537. ZOOMWINDOW
  538.    ,
  539.  
  540. ZOOMWINDOW makes the project's first window very small. Use
  541. "UNZOOMWINDOW" to unshrink it again.
  542.